====QUERY====
SELECT SQL_CALC_FOUND_ROWS * FROM city
WHERE $RECORD->WHERE 
ORDER BY [ORDER_BY] $ASCDESC
LIMIT [LIMIT_FROM],[LIMIT_TO]

====PRE_FORMAT_FIELDS====
<?php 
// Before to eval QUERY, you can check or assign here any variable

if ($RECORD->LIMIT_FROM < 0)
	$RECORD->LIMIT_FROM = 0;

if (!isset($RECORD->WHERE))
	$RECORD->WHERE = "1=1";
	
	if ($RECORD->ASCDESC == 1)
	    $ASCDESC = "ASC";
	else
	    $ASCDESC = "DESC";
?>
====POST_FORMAT_FIELDS====
<?php
// This function example converts country name in friendly url name
// Yo can add here any post action to be executed for all records

//$RECORD->Country_url = $this->getDataQuery("/examples/functions/examplef1",array("TXT_TO_CONVERT_TO_URL"=>'"'.$RECORD->Name));
?>
====POST_FORMAT_FIELDS_NO_RECORDS_FOUND====
<?php 

?>
====POST_SQL_COMMANDS_OK====
PHP: <?php ?>
SQL
====POST_SQL_COMMANDS_KO====
PHP: <?php ?>
SQL:
====POST_SQL_COMMANDS_NO_RECORDS_FOUND====
PHP: <?php ?>
SQL:
